<template>
  <div id="udemy" class="
    ud-app-loader
  udemy ">


    <div class="main-content-wrapper">


      <!--头部-->
      <myheader />


<div class="udlite-container partners">

      <!--上传表单-->

      <van-cell-group>
        

        <van-uploader :after-read="afterRead" />


      </van-cell-group>


       <van-cell-group>

        <van-image round width="10rem" height="10rem" :src="src" />

       </van-cell-group>


</div>



<footer class="udlite-footer ud-app-loader " data-module-id="common/udlite/desktop" data-module-args="{&quot;localeSelect&quot;:{&quot;currentLanguageId&quot;:&quot;zh_CN&quot;}}" data-module-priority="-10">
<div class="ud-component--footer--bai-banner"></div>
<div class="footer-section footer-section-main">
<div class="links-and-locale">
<div class="locale-select-container ud-component--footer--locale-select"></div>
<ul class="unstyled-list link-column ">
<li>
<a class="link udlite-text-sm ud-ufb-notice-click-event" href="https://business.udemy.com/?locale=zh_CN&amp;ref=footer&amp;mx_pg=home-page" target="_blank" rel="noopener" data-placement="footer">
Udemy for Business
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.teach" href="/teaching/?ref=teach_footer">
在 Udemy 上授课
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="None" href="/mobile/" target="_blank" rel="noopener noreferrer">
获取应用程序
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.about" href="https://about.udemy.com/?locale=zh-cn">
关于我们
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.contact" href="https://about.udemy.com/company?locale=zh-cn#offices">
联系我们
</a>
</li>
</ul>
<ul class="unstyled-list link-column ">
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.careers" href="https://about.udemy.com/careers?locale=zh-cn">
职业生涯
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.blog" href="https://blog.udemy.com/?ref=footer">
博客
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.support" href="/support/">
帮助和支持
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.affiliates" href="/affiliate/">
营销联盟
</a>
</li>
</ul>
<ul class="unstyled-list link-column ">
<li>
<a class="link udlite-text-sm" data-purpose="None" href="/terms/">
条款
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="None" href="/terms/privacy/">
隐私政策
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.cookie_preferences" href="javascript:void(0);" style="display: none;">
Cookie 设置
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.sitemap" href="/zh-cn/sitemap/">
网站地图
</a>
</li>
<li>
<a class="link udlite-text-sm" data-purpose="footer.links.popular_courses" href="/zh-cn/popular-courses/">
精选课程
</a>
</li>
</ul>
</div>
<div class="logo-and-copyright">
<div class="logo-container">
<a href="/" style="display:block">
<img alt="Udemy" class="ufb-logo" src="../assets/static/picture/logo-coral.svg" width="110" height="32" />
</a>
</div>
<div class="copyright-container udlite-text-xs">
&copy; 2021 Udemy, Inc.
</div>
</div>
</div>
<div class="ud-component--footer--eu-cookie-message"></div>
</footer>



</div>



    
  </div>
  
</template>


 
<script>

import md5 from 'js-md5';
import myheader from './myheader.vue'

export default {
  data () {
    return {
      msg: "这是一个变量",
      src:'http://localhost:8000/static/upload/touxiang.png',
      currentPage:1
      
    }
  },
  //注册组件标签
  components:{

    'myheader':myheader,

  },
  mounted:function(){

   this.$toast('内容');

  	
   
  
},
  methods:{

    change:function(){

      console.log(this.currentPage);

    },

    //文件上传
    afterRead:function(file){


        //定义参数
        let data = new FormData();
        data.append('file',file.file);

        //创建实例
        const axiosInstance = this.axios.create({withCredentials:false});


        axiosInstance({method:'POST',url:"http://localhost:8000/upload/",data:data}).then(res =>{

            console.log(res);
            //this.src = "http://localhost:8000/static/upload/" + res.data.filename;

        });


    }

  

     
  }
}


</script>
 
<style scoped>



</style>